package com.hnguigu.tms.order.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 项目启动时执行当前类中的run方法
 */

@Service
@Slf4j
public class CommandLineRunnerlmpl implements CommandLineRunner {

    @Resource
    private ReloadDroolsRulesService rules;

    @Override
    public void run(String... args) throws Exception {
        rules.reload();
    }
}
